home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Interfaces / MPW Interfaces / CIncludes / Types.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  2.3 KB  |  132 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        Types.h
  3.  
  4.     Copyright:    © 1983-1993 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Version:    System 7.1 for ETO #11
  8.     Created:    Tuesday, March 30, 1993 18:00
  9.  
  10. */
  11.  
  12. #ifndef __TYPES__
  13. #define __TYPES__
  14.  
  15.  
  16. #ifndef SystemSevenOrLater
  17. #define SystemSevenOrLater 0
  18. #endif
  19.  
  20. #ifndef SystemSixOrLater
  21. #define SystemSixOrLater SystemSevenOrLater
  22. #endif
  23.  
  24. #ifndef NULL
  25. #define NULL 0
  26. #endif
  27. #define nil 0
  28.  
  29. #define noErr 0            /*All is well*/
  30.  
  31. typedef unsigned char Byte;
  32. typedef char SignedByte;
  33. typedef char *Ptr;
  34. typedef Ptr *Handle;    /*  pointer to a master pointer */
  35.  
  36. typedef long Fixed;        /* fixed point arithmatic type */
  37. typedef Fixed *FixedPtr;
  38. typedef long Fract;
  39. typedef Fract *FractPtr;
  40. #ifdef mc68881
  41. struct extended80 {
  42.  short w[5];
  43. };
  44. typedef struct extended80 extended80;
  45.  
  46. #else
  47. typedef extended extended80;
  48.  
  49. #endif
  50.  
  51. enum {false,true};
  52. typedef unsigned char Boolean;
  53.  
  54. enum {v,h};
  55. typedef unsigned char VHSelect;
  56.  
  57.  
  58. typedef long (*ProcPtr)();
  59. typedef ProcPtr *ProcHandle;
  60.  
  61. typedef unsigned char Str255[256],Str63[64],Str32[33],Str31[32],Str27[28],Str15[16],*StringPtr,**StringHandle;
  62.  
  63. #ifdef __cplusplus
  64. inline unsigned char & Length(StringPtr string) { return (*string); }
  65. #else
  66. #define Length(string) (*(unsigned char *)(string))
  67. #endif
  68.  
  69. typedef const unsigned char *ConstStr255Param;
  70. typedef ConstStr255Param ConstStr63Param,ConstStr32Param,ConstStr31Param,
  71.  ConstStr27Param,ConstStr15Param;
  72.  
  73. typedef short OSErr;    /* error code */
  74. typedef unsigned long OSType;
  75. typedef OSType *OSTypePtr;
  76. typedef unsigned long ResType;
  77. typedef ResType *ResTypePtr;
  78. typedef unsigned char Style;
  79. typedef short ScriptCode;
  80. typedef short LangCode;
  81.  
  82.  
  83. struct Point {
  84.  short v;
  85.  short h;
  86. };
  87.  
  88. typedef struct Point Point;
  89. typedef Point *PointPtr;
  90.  
  91. struct Rect {
  92.  short top;
  93.  short left;
  94.  short bottom;
  95.  short right;
  96. };
  97.  
  98. typedef struct Rect Rect;
  99. typedef Rect *RectPtr;
  100.  
  101. enum {
  102.  normal = 0,
  103.  bold = 1,
  104.  italic = 2,
  105.  underline = 4,
  106.  outline = 8,
  107.  shadow = 0x10,
  108.  condense = 0x20,
  109.  extend = 0x40
  110. };
  111.  
  112.  
  113. #ifdef __cplusplus
  114. extern "C" {
  115. #endif
  116. pascal void Debugger(void)
  117.  = 0xA9FF; 
  118. pascal void DebugStr(ConstStr255Param aStr)
  119.  = 0xABFF; 
  120. void debugstr(char *aStr); 
  121. pascal void SysBreak(void)
  122.  = {0x303C,0xFE16,0xA9C9}; 
  123. pascal void SysBreakStr(ConstStr255Param debugStr)
  124.  = {0x303C,0xFE15,0xA9C9}; 
  125. pascal void SysBreakFunc(ConstStr255Param debugFunc)
  126.  = {0x303C,0xFE14,0xA9C9}; 
  127. #ifdef __cplusplus
  128. }
  129. #endif
  130.  
  131. #endif
  132.